package com.changli02.method_lifecycle.exer;

public class HappyNewYear {
    public static void main(String[] args) {
        int count = 10;
         while(true){
             if(count != 0){
                 try {
                     Thread.sleep(1000);
                 } catch (InterruptedException e) {
                     throw new RuntimeException(e);
                 }
                 System.out.println(count);
                 count--;
             }
             else {
                 break;
             }
         }
        System.out.println("新年快乐！");
    }
}
